


public class ClassWrapper {
	public String filePath(Entity entity){
		StringBuilder path = new StringBuilder();
		path.append(entity.getWEBPoject());
		path.append(entity.getSeparator());
		path.append("wrapper");
		path.append(entity.getSeparator());
		path.append(entity.getClassName());
		path.append("Wrapper.java");
		
		return path.toString();
	}
	
	public String sourceCode(Entity entity) {
		StringBuilder classBuilder = new StringBuilder();
		classBuilder.append("package ").append(entity.getBasePackage()).append(".wrapper;");
		classBuilder.append(System.getProperty("line.separator"));
		classBuilder.append(System.getProperty("line.separator"));
		classBuilder.append("import br.com.bs.fw.enumeration.FilterType;");
		classBuilder.append(System.getProperty("line.separator"));
		classBuilder.append("import br.com.bs.fw.util.GenericWrapper;");
		classBuilder.append(System.getProperty("line.separator"));
		classBuilder.append("import br.com.bs.fw.util.IGenericWrapper;");
		classBuilder.append(System.getProperty("line.separator"));
		classBuilder.append("import ").append(entity.getBasePackage()).append(".entity.").append(entity.getClassName()).append(";");
		classBuilder.append(System.getProperty("line.separator"));		
		classBuilder.append(System.getProperty("line.separator"));
		classBuilder.append("public class ").append(entity.getClassName()).append("Wrapper extends GenericWrapper<");
		classBuilder.append(entity.getClassName()).append("> implements IGenericWrapper<");
		classBuilder.append(entity.getClassName()).append("> {");
		classBuilder.append(System.getProperty("line.separator"));		
		classBuilder.append(System.getProperty("line.separator"));
		classBuilder.append("\tpublic ").append(entity.getClassName()).append("Wrapper () {");		
		classBuilder.append(System.getProperty("line.separator"));
		classBuilder.append("\t\taddSelectFilter(\"id\", \"Código\", FilterType.Long);");		
		classBuilder.append(System.getProperty("line.separator"));
		classBuilder.append("\t}");
		classBuilder.append(System.getProperty("line.separator"));
		classBuilder.append("}");
		
		return classBuilder.toString();
	}


}